﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using Visifire.Gauges;

namespace CPPEI.Coolzon.UI.DataPartLib
{
    public partial class DataGaugeDoubleCircularScale
    {
        protected NeedleIndicator SetNeedle2Indicator(NeedleIndicator needle2Indicator)
        {
            needle2Indicator.BorderBrush = Needle2BorderBrush==null? null : Needle2BorderBrush.Brush;
            needle2Indicator.BorderThickness = Needle2BorderThickness;
            needle2Indicator.Background = Needle2Background==null?null: Needle2Background.Brush;
            needle2Indicator.CapBackground = Needle2CapBackground==null? null : Needle2CapBackground.Brush;
            needle2Indicator.LabelBackground = Needle2LabelBackground==null? null : Needle2LabelBackground.Brush;
            needle2Indicator.LabelEnabled = Needle2LabelEnabled;
            needle2Indicator.LabelFontColor = Needle2LabelFontColor==null? null : Needle2LabelFontColor.Brush;
            needle2Indicator.LabelFontFamily = Needle2LabelFontFamily;
            needle2Indicator.LabelFontWeight = Needle2LabelFontWeight;
            needle2Indicator.LabelStyle = Needle2LabelStyle;
            needle2Indicator.Placement = Needle2Placement;
            needle2Indicator.ShadowEnabled = Needle2ShadowEnabled;
            needle2Indicator.ToolTipText = Needle2ToolTipText;


            needle2Indicator.CapWidth = Needle2CapWidth ?? 0.3;
            needle2Indicator.DistanceFromScale = Needle2DistanceFromScale;
            needle2Indicator.IndicatorWidth = Needle2IndicatorWidth ?? 0.15;
            return needle2Indicator;
        }
        private BrushEx needle2BorderBrush;
        private Thickness needle2BorderThickness;
        private BrushEx needle2Background;
        private BrushEx needle2CapBackground;
        private BrushEx needle2LabelBackground;
        private bool needle2LabelEnabled;
        private BrushEx needle2LabelFontColor;
        private FontFamily needle2LabelFontFamily;
        private FontWeight needle2LabelFontWeight;
        private LabelStyles needle2LabelStyle;
        private PlacementTypes needle2Placement;
        private bool needle2ShadowEnabled;
        private string needle2ToolTipText;


        private double? needle2CapWidth;
        private double needle2DistanceFromScale;
        private double? needle2IndicatorWidth;

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针边框颜色")]
        [Description("Needle2BorderBrush")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2BorderBrush", "指针边框颜色")]
        public BrushEx Needle2BorderBrush
        {
            get
            {
                return needle2BorderBrush;
            }

            set
            {
                needle2BorderBrush = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针边框大小")]
        [Description("Needle2BorderThickness")]
        [Editor(typeof(UI.XProperty.Editors.XThicknessEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2BorderThickness", "指针边框大小")]
        public Thickness Needle2BorderThickness
        {
            get
            {
                return needle2BorderThickness;
            }

            set
            {
                needle2BorderThickness = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针背景颜色")]
        [Description("Needle2Background")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2Background", "指针背景颜色")]
        public BrushEx Needle2Background
        {
            get
            {
                return needle2Background;
            }

            set
            {
                needle2Background = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针盖帽背景颜色")]
        [Description("Needle2CapBackground")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2CapBackground", "指针盖帽背景颜色")]
        public BrushEx Needle2CapBackground
        {
            get
            {
                return needle2CapBackground;
            }

            set
            {
                needle2CapBackground = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针标签背景颜色")]
        [Description("Needle2LabelBackground")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2LabelBackground", "指针标签背景颜色")]
        public BrushEx Needle2LabelBackground
        {
            get
            {
                return needle2LabelBackground;
            }

            set
            {
                needle2LabelBackground = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针标签是否可用")]
        [Description("Needle2LabelEnabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2LabelEnabled", "指针标签是否可用")]
        public bool Needle2LabelEnabled
        {
            get
            {
                return needle2LabelEnabled;
            }

            set
            {
                needle2LabelEnabled = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针标签字体颜色")]
        [Description("Needle2LabelFontColor")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2LabelFontColor", "指针标签字体颜色")]
        public BrushEx Needle2LabelFontColor
        {
            get
            {
                return needle2LabelFontColor;
            }

            set
            {
                needle2LabelFontColor = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针标签字体")]
        [Description("Needle2LabelFontFamily")]
        [Editor(typeof(UI.XProperty.Editors.XFontFamilyEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2LabelFontFamily", "指针标签字体")]
        public FontFamily Needle2LabelFontFamily
        {
            get
            {
                return needle2LabelFontFamily;
            }

            set
            {
                needle2LabelFontFamily = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针标签字体粗细")]
        [Description("Needle2LabelFontWeight")]
        [Editor(typeof(UI.XProperty.Editors.XFontWeightEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2LabelFontWeight", "指针标签字体粗细")]
        public FontWeight Needle2LabelFontWeight
        {
            get
            {
                return needle2LabelFontWeight;
            }

            set
            {
                needle2LabelFontWeight = value;
                Refresh();
            }
        }

        public LabelStyles Needle2LabelStyle
        {
            get
            {
                return needle2LabelStyle;
            }

            set
            {
                needle2LabelStyle = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针位置")]
        [Description("Needle2Placement")]
        [Editor(typeof(UI.DataPartLib.XProperty.Editors.XPlacementTypesEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2Placement", "指针位置")]
        public PlacementTypes Needle2Placement
        {
            get
            {
                return needle2Placement;
            }

            set
            {
                needle2Placement = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针是否显示阴影")]
        [Description("Needle2ShadowEnabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2ShadowEnabled", "指针是否显示阴影")]
        public bool Needle2ShadowEnabled
        {
            get
            {
                return needle2ShadowEnabled;
            }

            set
            {
                needle2ShadowEnabled = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针提示")]
        [Description("Needle2ToolTipText")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2ToolTipText", "指针提示")]
        public string Needle2ToolTipText
        {
            get
            {
                return needle2ToolTipText;
            }

            set
            {
                needle2ToolTipText = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针盖帽大小(0-1)")]
        [Description("Needle2CapWidth")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2CapWidth", "指针盖帽大小(0-1)")]
        public double? Needle2CapWidth
        {
            get
            {
                return needle2CapWidth;
            }

            set
            {
                needle2CapWidth = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针距离标尺距离(0-1)")]
        [Description("Needle2DistanceFromScale")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2DistanceFromScale", "指针距离标尺距离(0-1)")]
        public double Needle2DistanceFromScale
        {
            get
            {
                return needle2DistanceFromScale;
            }

            set
            {
                needle2DistanceFromScale = value;
                Refresh();
            }
        }

        [Category("第二表盘指针")]
        [DisplayName("第二表盘指针宽度(0-1)")]
        [Description("Needle2IndicatorWidth")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Needle2IndicatorWidth", "指针宽度(0-1)")]
        public double? Needle2IndicatorWidth
        {
            get
            {
                return needle2IndicatorWidth;
            }

            set
            {
                needle2IndicatorWidth = value;
                Refresh();
            }
        }
    }
}
